<?php
/**
 * 首页链接全局配置
 */
$IN_defaultpl=empty($IN_defaultpl)?"0":$IN_defaultpl;
define ( 'IN_templates', $IN_defaultpl);
include (dirname(__FILE__)."/includes/init.php");//全局变量

//页面属于
$mod=trim(empty($_REQUEST['mod'])?"index":$fun->checkInput($_REQUEST['mod']));
$smarty->assign("mod",$mod);
//页面动作
$act=trim(empty($_REQUEST['act'])?"":$fun->checkInput($_REQUEST['act']));
$smarty->assign("act",$act);
//来自的连接 用于三网合并 1首页 2论坛 3商城
$url_from=isset($_REQUEST["from"])?$_REQUEST["from"]:"";
$smarty->assign("from",$url_from);
//网站配置
$smarty->assign("cfg",$cfg);

//重定义url 用于伪静态
$list_url['suffix_tpl']=".html";//模版后缀
//伪静态开启路径 伪静态默认扩张名
$list_url['suffix']=empty($cfg['OFF_On'])?".php":".html";
$list_url['index']="index".$list_url['suffix'];
$list_url['login']=empty($cfg['OFF_On'])?"index.php?mod=login":"login".$list_url['suffix'];
$list_url['register']=empty($cfg['OFF_On'])?"index.php?mod=register":"register".$list_url['suffix'];
//QQ默认注册新用户
$list_url['bindqqcallback']=empty($cfg['OFF_On'])?"index.php?mod=bindqzone&act=bind_qq":"bindqzone-bind_qq".$list_url['suffix'];
$list_url['bindqzone']=empty($cfg['OFF_On'])?"index.php?mod=bindqzone":"bindqzone".$list_url['suffix'];
$list_url['bindsina']=empty($cfg['OFF_On'])?"index.php?mod=bindsina":"bindsina".$list_url['suffix'];
$list_url['foget_password']=empty($cfg['OFF_On'])?"index.php?mod=foget_password":"foget_password".$list_url['suffix'];
$list_url['change_password']=empty($cfg['OFF_On'])?"index.php?mod=change_password":"change_password".$list_url['suffix'];
$list_url['exit']=empty($cfg['OFF_On'])?"index.php?mod=exit":"exit".$list_url['suffix'];
$list_url['help']=empty($cfg['OFF_On'])?"index.php?mod=help":"help".$list_url['suffix'];
$list_url['index_list']=empty($cfg['OFF_On'])?"index.php?mod=index_list&":"index".$list_url['suffix']."?mod=index_list&";
$list_url['index_info']=empty($cfg['OFF_On'])?"index.php?mod=index_info&id=":"index_info-";
$list_url['index_maps']=empty($cfg['OFF_On'])?"index.php?mod=index_maps&id=":"index_maps-";


$smarty->assign("list_url",$list_url);

//踢出单独访问这个页面
if(empty($IN_defaultpl)){
	echo "<script  type='text/javascript' language='javascript'>window.location.href='".$list_url['index']."';</script>";
	exit();
}
?>